//
//  NetWorkSharedTools.h
//  EasyToTesco2.0
//
//  Created by 袖手旁觀 on 16/6/9.
//  Copyright © 2016年 EasyToTesco. All rights reserved.
//

#import <AFNetworking/AFNetworking.h>

typedef void(^CompleteBlock)(id object);

@interface NetWorkSharedTools : AFHTTPSessionManager

+ (instancetype)sharedNetWorkTools;

/**
 *  POST 请求数据单例方法
 *
 *  @param URLDict           传入字典参数
 *  @param MenthodNameString 传入接口请求名
 *  @param completeBlock     返回数据Block
 */
- (void)objectWithURLDict:(NSDictionary *)URLDict AndMenthodName:(NSString *)MenthodNameString completeBlock:(CompleteBlock)completeBlock;

/**
 *  GET 请求数据单例方法
 *
 *  @param URLDict           传入字典参数
 *  @param MenthodNameString 传入接口请求名
 *  @param completeBlock     返回数据Block
 */
- (void)GetObjectWithURLDict:(NSDictionary *)URLDict AndMenthodName:(NSString *)MenthodNameString completeBlock:(CompleteBlock)completeBlock;

- (id)toArrayOrNSDictionary:(NSData *)jsonData;

@end
